#!/bin/sh
cat <<'EOF'

echo; cat <<EOH
 ==============================================================================
 Basic info:
 ------------------------------------------------------------------------------
EOH
echo "You are currently in ($(pwd)) on ($(hostname)) as ($USER)."
echo "PATH is ($PATH)"
EOF
cat <<EOF

echo; cat <<EOH
 ==============================================================================
 Heartbleed check (affected versions are OpenSSL 1.0.1 through 1.0.1f):
 ------------------------------------------------------------------------------
EOH
$(test-heartbleed)

echo; cat <<EOH
 ==============================================================================
 Shellshock check (will print 'vulnerable' if vulnerable):
 ------------------------------------------------------------------------------
EOH
$(test-shellshock)
EOF
cat <<'EOF'

echo; cat <<EOH
 ==============================================================================
 Bash history for ($USER):
 ------------------------------------------------------------------------------
EOH
echo $ cat ~/.bash_history
       cat ~/.bash_history

echo; cat <<EOH
 ==============================================================================
 Aliases for ($USER):
 ------------------------------------------------------------------------------
EOH
echo $ alias
       alias

echo; cat <<EOH
 ==============================================================================
 Passwd file:
 ------------------------------------------------------------------------------
EOH
echo $ cat /etc/passwd
       cat /etc/passwd

echo; cat <<EOH
 ==============================================================================
 Groups file:
 ------------------------------------------------------------------------------
EOH
echo $ cat /etc/group
       cat /etc/group

echo; cat <<EOH
 ==============================================================================
 Environment variables for ($USER):
 ------------------------------------------------------------------------------
EOH
echo $ env
       env

echo; cat <<EOH
 ==============================================================================
 ifconfig:
 ------------------------------------------------------------------------------
EOH
echo $ /sbin/ifconfig
       /sbin/ifconfig

echo; cat <<EOH
 ==============================================================================
 Routing table:
 ------------------------------------------------------------------------------
EOH
echo $ /sbin/route
       /sbin/route

echo; cat <<EOH
 ==============================================================================
 ARP cache, resolve IPs:
 ------------------------------------------------------------------------------
EOH
echo $ /sbin/arp -a
       /sbin/arp -a

echo; cat <<EOH
 ==============================================================================
 ARP cache, don't resolve IPs:
 ------------------------------------------------------------------------------
EOH
echo $ /sbin/arp -a -n
       /sbin/arp -a -n

echo; cat <<EOH
 ==============================================================================
 DNS info:
 ------------------------------------------------------------------------------
EOH
echo $ cat /etc/resolv.conf
       cat /etc/resolv.conf

echo; cat <<EOH
 ==============================================================================
 Hosts:
 ------------------------------------------------------------------------------
EOH
echo $ cat /etc/hosts
       cat /etc/hosts

echo; cat <<EOH
 ==============================================================================
 All processes:
 ------------------------------------------------------------------------------
EOH
echo $ ps aux
       ps aux

echo ; cat <<EOH
 ==============================================================================
 Network connections:
 ------------------------------------------------------------------------------
EOH
echo $ netstat -pna
       netstat -pna

echo; cat <<EOH
 ==============================================================================
 Directory listing of (/etc):
 ------------------------------------------------------------------------------
EOH
echo $ ls -la /etc
       ls -la /etc

echo; cat <<EOH
 ==============================================================================
 Directory listing of ($HOME):
 ------------------------------------------------------------------------------
EOH
echo $ ls -la ~/
       ls -la ~/

EOF

